<?php use_helper('Object', 'Validation', 'ObjectAdmin', 'I18N', 'Date') ?>
<title>WMS—<?= $sf_response->getTitle() ?></title>
<?php if ($type==0) { if (isset($componentsList)) {?>
<table id ='added_components' "cellspacing="0" class="sf_admin_list">
<thead>
<tr>
      <th id="sf_admin_list_th_productcode" width="25%">Product Code
              </th>
      <th id="sf_admin_list_th_description" width="35%">Description
              </th>
      <th id="sf_admin_list_th_description" width="10%">Brand
              </th>       
      <th id="sf_admin_list_th_description" width="10%">Unit
              </th>
      <th id="sf_admin_list_th_description">Qty Outstanding</th>
      <th id="sf_admin_list_th_description">Qty Received</th>
</tr>
</thead>
<!--show component here-->
<?php  
    foreach ($componentsList as $key=>$components) { 
        $component1= ComponentPeer::retrieveByPK($components->getComponentId());?>
        <tr class="sf_admin_row_<?php echo $key%2?>">
            <input type="hidden" name="rowIds[]" id ="rowIds"  class = "ExistComponents" value="<? echo $component1->getId()?>"/>
            <td><?echo $component1->getProductcode()?></td>
            <td><?echo $component1->getDescription()?></td>
            <td><?echo $component1->getBrand()?></td>
            <td><?echo $component1->getComponentunit()?></td>
            <td><input type="hidden" name="qty2s[]" id ="qty2s" size="7"  value="<? echo $components->getQty4()?>">
            <input type="text" name="qty3s[]" id ="qty3s" size="7" disabled value="<? echo $components->getQty4()?>"></td>            
            <td><input type="text" name="qtys[]" id ="qtys" size="7" ></td>            
<?php }?>
</table>
<? } } elseif ($type==CommonValues::$gTallyInType['key']['Production']) { if (isset($componentsList)) {?>
<table id ='added_components' "cellspacing="0" class="sf_admin_list">
<thead>
<tr>
      <th id="sf_admin_list_th_productcode" width="25%">Product Code
              </th>
      <th id="sf_admin_list_th_description" width="35%">Description
              </th>
      <th id="sf_admin_list_th_description" width="10%">Brand
              </th>       
      <th id="sf_admin_list_th_description" width="10%">Unit
              </th>
      <th id="sf_admin_list_th_description">Qty Outstanding</th>
      <th id="sf_admin_list_th_description">Return Unused Qty</th>
</tr>
</thead>
<!--show component here-->
<?php  
    foreach ($componentsList as $key=>$components) { 
        $component1= ComponentPeer::retrieveByPK($components->getComponentId());?>
        <tr class="sf_admin_row_<?php echo $key%2?>">
            <input type="hidden" name="rowIds[]" id ="rowIds"  class = "ExistComponents" value="<? echo $component1->getId()?>"/>
            <td><?echo $component1->getProductcode()?></td>
            <td><?echo $component1->getDescription()?></td>
            <td><?echo $component1->getBrand()?></td>
            <td><?echo $component1->getComponentunit()?></td>
             
            <td>
            <input type="text" name="outstanding1[]" id ="outstanding1" size="7"  disabled value ="<? echo $components->getQty1() - $components->getQty4()?>">
            <input type="hidden" name="qty2s[]" id ="qty2s" size="7"  value ="<? echo $components->getQty1() - $components->getQty4()?>">
            </td>    
            <td><input type="text" name="qtys[]" id ="qtys" size="7" ></td>            
<?php }?>
</table>
<? } }?>